<template>
	<a-button
		v-bind="$attrs"
		class="app-button"
		:type="type"
		:htmlType="htmlType"
        :size="size"
		:disabled="disabled"
		:loading="loading"
		:shape="shape"
		:ghost="ghost"
		:block="block"
		:danger="danger"
		@click="handleClick"
	>
		<template #icon>
			<slot name="icon"></slot>
		</template>
		<slot></slot>
	</a-button>
</template>
<script lang="ts" setup>
import { buttonProps } from './button';
const name = 'AppButton';
const props = defineProps(buttonProps);
const emit = defineEmits(['click']);
const handleClick = (event: MouseEvent) => {
	emit('click', event);
};
</script>
